Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Feb 3, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

cmb69 added 2 commits February 3, 2025 16:42
sendmail.h is not only included by sendmail.c, but also by
php_win32_globals.h, because that header uses some of the defined
macros.  However, the forward declarations of the static functions are
not needed anywhere else than in sendmail.c, and Clang warns about the
unused functions elsewhere (`-Wunused-function`).  Thus we move the
forward declarations to sendmail.c.
@pull pull bot added the ⤵️ pull label Feb 3, 2025
ndossche and others added 26 commits February 3, 2025 19:21
…rash

This test has two classes that use the same trait. In function JIT mode
the same cache slot will be used. This causes problems because it is
primed for the first class and then reused for the second class,
resulting in an incorrect type check failure.

The current check for a megamorphic trait call requires current_frame to
not be NULL, but this is only set in tracing mode and not in function
mode.

This patch corrects the check.

Closes GH-17660.
* PHP-8.3:
  Fix GH-17654: Multiple classes using same trait causes function JIT crash
* PHP-8.4:
  Fix GH-17654: Multiple classes using same trait causes function JIT crash
When a guard check is created for a variable to check if it's a packed array,
it is possible that there was no prior type check for that variable.
This happens in the global scope for example when the variable aliases.
In the test, this causes a dereference of address 8 because the integer
element in `$a` is interpreted as an array address.

This patch adds a check to see if the guard is handled.
If we were not able to determine or guard the type then we also cannot know the array is packed.

Closes GH-17584.
* PHP-8.3:
  Fix GH-17577: JIT packed type guard crash
* PHP-8.4:
  Fix GH-17577: JIT packed type guard crash
Since `pdo_odbc_ucs22utf8()` doesn't actually use the `stmt`, we drop
this parameter as well.
These warnings are about conversion from `size_t` to a smaller type[1],
and in this case because `gdIOCtx` works with `int` lengths.  Two of
these warnings are harmless, and we resolve them by using `size_t` in
the first place, and adding a cast (plus an assertion), respectively.

The others actually hint at potential issues when reading image data
with more than `INT_MAX` bytes; we catch that upfront, and throw a
`ValueError` and a warning, respectively.

[1] <https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4267>
This was asked to be checked in #17472 (comment)

There are 2 issues:
1) The UB in the if can overflow, and can be fixed by using zend_ulong
   for the sum/sub.
2) fast_long_sub_function() has a problem when result aliases.
   This is fixed in the same way as fast_long_add_function() works.

Closes GH-17666.
* PHP-8.3:
  Fix fallback paths in fast_long_{add,sub}_function
* PHP-8.4:
  Fix fallback paths in fast_long_{add,sub}_function
* PHP-8.1:
  [skip ci] Another flaky phar macOS test
* PHP-8.2:
  [skip ci] Another flaky phar macOS test
* PHP-8.3:
  [skip ci] Another flaky phar macOS test
* PHP-8.4:
  [skip ci] Another flaky phar macOS test
Conversion of floating point to integer values is undefined if the
integral part of the float value cannot be represented by the integer
type.  We need to cater to that explicitly (in a manner similar to
`zend_dval_to_lval_cap()`).

Closes GH-17689.
* PHP-8.3:
  Fix GH-17503: Undefined float conversion in mb_convert_variables
* PHP-8.4:
  Fix GH-17503: Undefined float conversion in mb_convert_variables
@pull pull bot merged commit dc7161c into wudi:master Feb 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants